package cn.edu.hnu.matching.job.once;

import cn.edu.hnu.matching.manager.RedissonManager;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 单次任务，初始化用户推荐缓存池
 */
@Component
@RequiredArgsConstructor
public class InitUserRecommendCachePool implements CommandLineRunner {

    private final RedissonManager redissonManager;

    @Override
    public void run(String... args) throws Exception {
        redissonManager.cacheUserRecommendPool();
    }
}
